<?php

function saveError($type, $name, $time, $msg){
	
	
	 $strSqlCommand = "INSERT INTO ERROR (Type, UserName, errorTime, errorMsg)
 						VALUES ('".$type."', '".$name."', '".$time."', '".$msg."')";
	 
	if (!mysql_query($strSqlCommand)) {
		die(mysql_error());
	 	echo "<Error Message=\"".mysql_error()."\" Domain=\"Error\" />";
	 	return;
	}
	
	if (mysql_insert_id()!=0)
		echo '<Success Message="The requested Information was accepted" ErrorId="'.mysql_insert_id().'" Domain="Error" />';
}

function saveError_Feed($type, $name, $time, $msg){
	
	
	 $strSqlCommand = "INSERT INTO ERROR (Type, UserName, errorTime, errorMsg)
 						VALUES ('".$type."', '".$name."', '".$time."', '".$msg."')";
	 
	if (!mysql_query($strSqlCommand)) {
		die(mysql_error());
	 	//echo "<Error Message=\"".mysql_error()."\" Domain=\"Error\" />";
	 	return;
	}
}

?>
